{block name="script"}
<script src="https://lib.baomitu.com/jquery/3.6.0/jquery.js"></script>
<script src="https://cdn.bootcdn.net/ajax/libs/clipboard.js/1.4.2/clipboard.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/layui/2.6.8/layui.js"></script>
<script>       
    $(document).ready(function(){
        var content = $("#copy").text();
        console.log(content);
        setTimeout(()=>{
            var clipboard = new Clipboard('#copy', {
                text: function() {
                    return content;
                }
            });
            clipboard.on('success', function(e) {
                layer.msg('复制成功',{icon: 1},1000);
            });
            clipboard.on('error', function(e) {
                console.log(e);
            });
        },500)


    });
</script>
{/block}